package cn.txm.org.controller;

import cn.txm.org.domain.SystemDictionaryDetail;
import cn.txm.org.service.ISystemDictionaryDetailService;
import cn.txm.pet.domain.PetType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SystemDictionaryDetailController {
    @Autowired
    private ISystemDictionaryDetailService systemDictionaryDetailService;

    /**
     * 通过数据字典类型的sn查询数据字典明细数据（一般用来做下拉框）
     * @param sn
     * @return
     */
    @GetMapping("/systemDictionaryDetail/{sn}")
    public List<SystemDictionaryDetail> loadDetailbysn(@PathVariable String sn){
        return systemDictionaryDetailService.loadDetailbysn(sn);
    }
    /**
     * 查询宠物pet_type品种
     * @param
     * @return
     */
    @GetMapping("/systemDictionaryDetail")
    public List<PetType> loadtype(){
        return systemDictionaryDetailService.loadtype();
    }


}
